package com.webserver.vo;

import java.io.Serializable;

/**
 * vo:value Object  指对象
 * 这样的对象用于保存一组值,没有什么业务逻辑
 */
public class User implements Serializable {//实现了  序列化接口
    private String username;//账号名
    private String password;//密码
    private String nickname;//用户名
    private int age;//年龄

    //字符串格式
    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", age=" + age +
                '}';
    }
    //构造器
    public User(String username, String password, String nickname, int age) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.age = age;
    }
    //获取方法
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
